<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    // ++ --  的隐式类型转换
    // 其他类型的数据(string boolean null undefined) 遇到 ++ -- 会先隐式的转化为数字 再自增/自减 

    var a = 10;
    var a = "10"; // "10" => 10   a++  => 11
    var a = "10a"; // "10a" => NaN   a++  =>NaN
    var a = "";    // "" => 0   a++  => 1
    
    var a = true;    // true => 1   a++  => 2
    var a = false;    // false => 0   a++  => 1
    
    var a = null;    // null => 0   a++  => 1
    var a = undefined; // undefined => NaN   a++  =>NaN

    a++;
    console.log(a);

</script>
</html>